Executing structured query language (SQL) statements in a database management system (DBMS), requires the DBMS to go through the following high level steps: 1) parse the SQL statement (understand what the SQL instructions are); 2) optimize a logical execution plan for the query using an optimizer (decide how best to perform the SQL instructions); 3) perform the execution plan. Each of these steps is time critical and the combination of all three determines the total execution time of a query. Regardless of overall SQL optimization techniques, the optimizer still has to be run. Local/online execution of an optimizer (adhoc) as part of query execution can require valuable system resources and necessitate highly streamlined optimizers (e.g., using rule-based rewriting strategies and similar heuristics) to permit low resource usage and fast completion time.